package org.ccf.certified.business.shiro.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.ccf.certified.business.shiro.model.Role;

import java.util.Set;

/**
 * @author LiuFang
 * @date 2022/1/12
 */
@Mapper
public interface IRoleRepository extends BaseMapper<Role> {

    /**
     * 根据用户ID，查询当前用户所包含的角色
     * @param userId    用户ID
     * @return  RoleKeys
     */
    Set<Role> findRolesByUserId(@Param("userId") Long userId);
}
